

import type { AdvertisementAddParams, AdvertisementData } from "../type/advertisement"
import type { StoreservicesListData } from "../type/stores"
import http from "../utils/request"

// 类型
export const adtypeTypeList = () => http.get<StoreservicesListData>('/adtype/list')
// 列表
export const advertisementList = (data: any) => http.get<AdvertisementData>('/advertisement/list', data)
// 单个删除
export const advertisementDelete = (id: number) => http.get<AdvertisementData>('/advertisement/delete', { id })
// 批量删除
export const advertisementDeleteAll = (ids: number[]) => http.post<AdvertisementData>('/advertisement/deleteall', { ids })
// 添加
export const advertisementAdd = (params: AdvertisementAddParams) => http.post<AdvertisementData>('/advertisement/add', params)
// 修改
export const advertisementGet = (id: number) => http.get<AdvertisementData>('/advertisement/get', { id })
